package com.vaadin.incubator.bugrap.tests.model;

import org.junit.Test;

import com.vaadin.incubator.bugrap.model.facade.FacadeUtil;
import com.vaadin.incubator.bugrap.model.projects.Project;
import com.vaadin.incubator.bugrap.model.users.Reporter;

public class ProjectTest extends TestBase {

	@Test
	public void testGetName() {
		Project p = new Project();
		p.setName("Name");
		p = FacadeUtil.store(p);
		assertEquals("Name", p.getName());
	}

	@Test
	public void testSetName() {
		Project p = new Project();
		p.setName("Name");
		p = FacadeUtil.store(p);
		assertEquals("Name", p.getName());
	}

	@Test
	public void testGetManager() {
		Reporter manager = new Reporter();
		manager = FacadeUtil.store(manager);

		Project p = new Project();
		p.setManager(manager);
		p = FacadeUtil.store(p);
		assertEquals(manager, p.getManager());
	}

	@Test
	public void testSetManager() {
		Reporter manager = new Reporter();
		manager = FacadeUtil.store(manager);

		Project p = new Project();
		p.setManager(manager);
		p = FacadeUtil.store(p);
		assertEquals(manager, p.getManager());
	}

}
